 <%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
<head>
</head>
<script type="text/javascript">
	$(function(){
		$("#formID").validationEngine({
			showOnMouseOver : true
		});
		$("#btn_save").click(function(){
			var valid = $("#formID").validationEngine('validate');
			if(!valid)
				return;
			var frm = $("form[name='moduleOperateForm']");
			frm.attr("action", "${ctx}/moduleOperateController.do?method=save&moduleid=${moduleid}");
			submit(frm,function(res,status){
				win.window("close");
				if(isSuccess(res,status)){
					grid.datagrid("reload");
					showTip(alertinfo+"成功");
				}else showTip(alertinfo+"失败");
			},function(res,status){
				win.window("close");
				showTip(alertinfo+"失败");
			});
		});
		$("#btn_back").click(function(){
			win.window("close");
		});
	});
</script>
<body>
	<form action="/moduleOperateController" method="post" name="moduleOperateForm" id="formID">
		<c:if test="${moduleOperate!=null}">
			<input type="hidden" name="moduleOperateid" value="${moduleOperate.moduleOperateid}"/>
		</c:if>
		<div>
			<table class="FormView" border="0" cellspacing="1" cellpadding="0">
				<col class="Label" />
				<col class="Data" />
				<tr>
					<td>操作名称：</td>
					<td><input type="text" name="operateName" id="operateName" class="validate[required,maxSize[10]] text" value="${moduleOperate.operateName}" onchange="check()"/><font color="red">**</font></td> 
				</tr>
				<tr>
					<td>操作编码：</td>
					<td><input type="text" name="operateCode" id="operateCode" class="validate[required,maxSize[20]] text" value="${moduleOperate.operateCode}"/></td> 
				</tr>
			</table>
		</div>
	</form>
	<div align="center" class="foot-buttons""
			border="false" align="center">
			<div class="tool-btn" id="btn_save">
				<span class="icon-save">&nbsp;</span>
				保存
			</div>
			<div class="tool-btn" id="btn_back">
				<span class="icon-back">&nbsp;</span>
				返回
			</div>
	</div>
</body>
</html>
